import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/view/home'
import Login from '@/view/login'
import Guide from '@/view/guide'
import Register from '@/view/register'
import Forget from '@/view/forget'
import Notice from '@/view/notice'
import GrowthRecord from '@/view/growthRecord'
import Detail from '@/view/detail'
import ScoreDetial from '@/view/scoreDetial'
import My from '@/view/my'
import PersonnalData from '@/view/personalData'
import WorkDetail from '@/view/workDetail'
import MyList from '@/view/myList'
import Message from '@/view/message'

Vue.use(Router)

export default new Router({
	scrollBehavior(to, from, savedPosition) {
		return {
			x: 0,
			y: 0
		}
	},
	routes: [{
			path: '/',
			name: 'guide',
			component: Guide,
			meta: {
				title: '向导'
			}


		},
		{
			path: '/home',
			name: 'home',
			component: Home,
			meta: {
				title: '首页'
			}
		},
		{
			path: '/login',
			name: 'login',
			component: Login,
			meta: {
				title: '登录'
			}

		},
		{
			path: '/register',
			name: 'register',
			component: Register,
			meta: {
				title: '注册'
			}
		},
		{
			path: '/forget',
			name: 'forget',
			component: Forget,
			meta: {
				title: '找回密码'
			}

		},
		{
			path: '/notice',
			name: 'notice',
			component: Notice,
			meta: {
				title: '消息中心'
			}

		},
		{
			path: '/grow',
			name: 'growthRecord',
			component: GrowthRecord,
			meta: {
				title: '成长记录'
			}

		},
		{
			path: '/detail',
			name: 'detail',
			component: Detail,
			meta: {
				title: '动态详情'
			}

		},
		{
			path: '/scoreDetail',
			name: 'scoreDetail',
			component: ScoreDetial,
			meta: {
				title: '分数详情'
			}

		},
		{
			path: '/my',
			name: 'my',
			component: My,
			meta: {
				title: '我的'
			}

		},
		{
			path: '/personalData',
			name: 'personnalData',
			component: PersonnalData,
			meta: {
				title: '个人资料'
			}

		},
		{
			path: '/workDetail',
			name: 'WorkDetail',
			component: WorkDetail,
			meta: {
				title: '作业详情'
			}

		},
		{
			path: '/myList',
			name: 'myList',
			component: MyList,
			meta: {
				title: '详情'
			}

		},
				{
					path: '/message',
					name: 'message',
					component: Message,
					meta: {
						title: '留言'
					}
		
				},


	]
})
